All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.LineAttributes
java.lang.Object
|
+----javax.media.j3d.SceneGraphObject
|
+----javax.media.j3d.NodeComponent
|
+----javax.media.j3d.LineAttributes
- public class LineAttributes
- extends NodeComponent
The LineAttributes object defines all rendering state that can be set
as a component object of a Shape3D node.
-
PATTERN_DASH
- Draw a dashed line.
-
PATTERN_DASH_DOT
- Draw a dashed-dotted line.
-
PATTERN_DOT
- Draw a dotted line.
-
PATTERN_SOLID
- Draw a solid line with no pattern.
-
LineAttributes()
- Constructs LineAttributes object with default values.
-
LineAttributes(float, int, boolean)
- Constructs LineAttributes object with specified values.
-
cloneNodeComponent()
- Creates a new LineAttributes object.
-
duplicateNodeComponent(NodeComponent)
- Copies the information found in
originalNode
to
the current node.
-
getLineAntialiasingEnable()
- Retrieves the state of the line antialiasing flag.
-
getLinePattern()
- Gets the line pattern for this lineAttributes component object.
-
getLineWidth()
- Gets the line width for this lineAttributes component object.
-
setLineAntialiasingEnable(boolean)
- Enables or disables line antialiasing
for this lineAttributes component object.
-
setLinePattern(int)
- Sets the line pattern for this lineAttributes component object.
-
setLineWidth(float)
- Sets the line width for this lineAttributes component object.
PATTERN_SOLID
public static final int PATTERN_SOLID
- Draw a solid line with no pattern.
PATTERN_DASH
public static final int PATTERN_DASH
- Draw a dashed line. Ideally, this will be drawn with
a repeating pattern of 8 pixels on and 8 pixels off.
PATTERN_DOT
public static final int PATTERN_DOT
- Draw a dotted line. Ideally, this will be drawn with
a repeating pattern of 1 pixel on and 7 pixels off.
PATTERN_DASH_DOT
public static final int PATTERN_DASH_DOT
- Draw a dashed-dotted line. Ideally, this will be drawn with
a repeating pattern of 7 pixels on, 4 pixels off, 1 pixel on,
and 4 pixels off.
LineAttributes
public LineAttributes()
- Constructs LineAttributes object with default values.
LineAttributes
public LineAttributes(float lineWidth,
int linePattern,
boolean lineAntialiasing)
- Constructs LineAttributes object with specified values.
- Parameters:
- lineWidth - the width of lines.
- linePattern - one of legal pattern.
- lineAntialiasing - flag to set line antialising ON or OFF
setLineWidth
public final void setLineWidth(float lineWidth)
- Sets the line width for this lineAttributes component object.
- Parameters:
- lineWidth - the width, in pixels, of line primitives
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
getLineWidth
public final float getLineWidth()
- Gets the line width for this lineAttributes component object.
- Returns:
- the width, in pixels, of line primitives
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
setLinePattern
public final void setLinePattern(int linePattern)
- Sets the line pattern for this lineAttributes component object.
- Parameters:
- linePattern - the line pattern to be used, one of:
PATTERN_SOLID, PATTERN_DASH, PATTERN_DOT, or PATTERN_DASH_DOT
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
getLinePattern
public final int getLinePattern()
- Gets the line pattern for this lineAttributes component object.
- Returns:
- the line pattern
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
setLineAntialiasingEnable
public final void setLineAntialiasingEnable(boolean state)
- Enables or disables line antialiasing
for this lineAttributes component object.
- Parameters:
- state - true or false to enable or disable line antialiasing
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
getLineAntialiasingEnable
public final boolean getLineAntialiasingEnable()
- Retrieves the state of the line antialiasing flag.
- Returns:
- true if line antialiasing is enabled,
false if line antialiasing is disabled
- Throws: RestrictedAccessException
- if the method is called
when this object is part of live or compiled scene graph
cloneNodeComponent
public NodeComponent cloneNodeComponent()
- Creates a new LineAttributes object. Called from a Leaf
node's
duplicateNode
method.
- Returns:
- a duplicate of the LineAttributes object.
- Overrides:
- cloneNodeComponent in class NodeComponent
- See Also:
- duplicateNode, cloneTree, setDuplicateOnCloneTree
duplicateNodeComponent
public void duplicateNodeComponent(NodeComponent originalNode)
- Copies the information found in
originalNode
to
the current node. This routine is called as part of the
cloneTree
operation.
- Parameters:
- originalNode - the node to duplicate.
- Overrides:
- duplicateNodeComponent in class NodeComponent
- See Also:
- cloneTree, duplicateNode, setDuplicateOnCloneTree
All Packages Class Hierarchy This Package Previous Next Index